Skip to content

fix(policy-advisor): accept reviewed CA augmentation on public HTTPS - #19

Merged
craig-kindo merged 4 commits into
mainfrom
kindo/advisor-ca-augmentation
Oct 10, 2026
Merged

craig-kindo merged 4 commits into
mainfrom
kindo/advisor-ca-augmentation

Conversation

@craig-kindo

Copy link
Copy Markdown

Summary

Complete the fork side of the advisor CA trust lane from merged fork PR #15. A reviewed exact-host CA rule can now augment an existing HTTPS allow rule on port 443, and the advisor skill installs in non-root agent pods.

Related Issue

No issue required: localized fixes to the merged endpoint-CA implementation in fork PR #15. Companion to Kindo mono PR #14712.

Changes

  • Accept a CA-only augmentation over a no-CA rule while rejecting two different CAs for the same destination. Require CA-bearing rules to name an exact host.
  • Preserve an existing explicit allowed_ips list when the CA rule leaves it unset. Different explicit lists still conflict. The supervisor selects matching CA and IP restrictions independently of endpoint iteration order.
  • Install the advisor skill and full guide in $HOME/.claude/skills/policy-advisor when the non-root agent cannot write /etc/openshell/skills; expose the home path in denial guidance. The native Kubernetes sidecar template also mounts a writable system skills directory.
  • Teach the skill to treat CONNECT 200 followed by a TLS reset as a possible upstream trust failure and request the service owner's CA PEM.
  • Add regression tests and update policy advisor and architecture documentation. Add a missing SPDX header in an unchanged upstream file so the license check passes.

Testing

  • mise run pre-commit passes. Formatting, SPDX, Helm, and other completed checks passed; its workspace Clippy task fails on existing lints in unchanged crates such as openshell-conformance and openshell-vfio.
  • Unit tests added/updated. cargo test --workspace --lib: 5,859 passed, 0 failed, 10 ignored across 32 suites. cargo fmt --all -- --check passed.
  • E2E tests added/updated. Manual k3d advisor-stack verification completed:
    • A local selfsigned-443.sandbox.svc:443 fixture reached through the public-HTTPS baseline returned CONNECT 200 followed by a TLS reset before approval. The old gateway rejected its CA proposal with upstream_ca_pem differing from public_internet; the new gateway accepted it.
    • Human approval returned policy_reloaded: true; curl https://selfsigned-443.sandbox.svc/ returned selfsigned-ok and HTTP 200 without --cacert or --insecure.
    • A later different CA for the same host:port was rejected. The ambiguity unit test also rejects two different CA-bearing rules.
    • A fresh UID-1000 sandbox had readable SKILL.md, the full guide, and AGENTS.md in its home. After restoring normal ClusterIP DNS, the baseline IP restriction blocked that private destination with CONNECT 403.
    • Temporary CoreDNS routing and Service external IP were removed; the gateway, sandbox API, token issuer, controller, DNS, and local fixture deployments were healthy.

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated

Signed-off-by: craig <craig@kindo.ai>
…all skill

Signed-off-by: craig <craig@kindo.ai>
Signed-off-by: craig <craig@kindo.ai>
Signed-off-by: craig <craig@kindo.ai>
@craig-kindo
craig-kindo merged commit 6e69e23 into main Oct 10, 2026
14 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant